package response

import "github.com/goccy/go-json"

type WebsocketResponse struct {
	Modules string `json:"modules"`
	Message string `json:"message"`
	Types   string `json:"types"`
}

func NewWebsocketResponse(modules, message, types string) *WebsocketResponse {
	return &WebsocketResponse{
		Modules: modules,
		Message: message,
		Types:   types,
	}
}

func (w *WebsocketResponse) BuildMessage() []byte {
	bytes, _ := json.Marshal(w)
	return bytes
}
